package com.yoso.shop.application.service;

import com.yoso.base.service.IBaseService;
import com.yoso.shop.domain.cart.CartEntityExample;
import com.yoso.shop.interfaces.vo.cart.CartVo;
import com.yoso.shop.interfaces.vo.order.OrderVo;

import java.util.List;

/**
 * @author shizejin
 * @date 2022/1/30
 * @description:
 */
public interface ICartService extends IBaseService<CartVo, CartEntityExample> {
    void flushCart(OrderVo orderVo);

    int deleteByUniqueKey(CartVo cartVo);

    /**
     * 根据用户账号获得购物车列表
     */
    List<CartVo> getCartByUsername(String username);

    /**
     * 构建购物车详情（添加商品信息）
     */
    List<CartVo> buildDetailInfoList(Iterable<CartVo> cartVos);
}
